﻿@page "/Lines/Basic"
@using LiveChartsCore.SkiaSharpView.Blazor
@using LiveChartsCore;
@using LiveChartsCore.SkiaSharpView;
@using LiveChartsCore.SkiaSharpView.Drawing.Geometries;
@using LiveChartsCore.SkiaSharpView.Painting;
@using LiveChartsCore.SkiaSharpView.VisualElements;
@using SkiaSharp;

<CartesianChart Series="@series" Title="@title" />

@code {
    private ISeries[] series = new ISeries[]
    {
        new LineSeries<double>
        {
            Values = new double[] { 2, 1, 3, 5, 3, 4, 6 },
            Fill = null,
            GeometrySize = 20
        },
        new LineSeries<int, StarGeometry>
        {
            Values = new int[] { 4, 2, 5, 2, 4, 5, 3 },
            Fill = null,
            GeometrySize = 20
        }
    };

    private DrawnLabelVisual title = new DrawnLabelVisual(
        new LabelGeometry
        {
            Text = "My chart title",
            Paint = new SolidColorPaint(SKColor.Parse("#303030")),
            TextSize = 25,
            Padding = new LiveChartsCore.Drawing.Padding(15)
        });
}
